#include "my_lcd.h"

My_lcd::My_lcd(const QString &title, QWidget *parent) : QWidget(parent)
{
    name = new QLabel(title, this);
    name->setAlignment(Qt::AlignCenter);
    lcd = new QLCDNumber(this);
    box = new QHBoxLayout();
    box->addWidget(name);
    box->addWidget(lcd);
    box->setContentsMargins(LEFT_M, TOP_M, RIGHT_M, BOTTOM_M);
    box->setSpacing(SPACE_SON);
    setLayout(box);
}

void My_lcd::display(int num)
{
    lcd->display(num);
}
